package utils

import "github.com/zeromicro/go-zero/core/fx"

func Collector[T any](s fx.Stream) []T {
	var a []T
	s.ForEach(func(item any) {
		t := item.(T)
		a = append(a, t)
	})
	return a
}
